package com.example.xungeng2.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.xungeng2.mapper.RiskPointMapper;
import com.example.xungeng2.pojo.RiskPoint;
import com.example.xungeng2.service.RiskPointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional
public class RiskPointServiceImpl extends ServiceImpl<RiskPointMapper, RiskPoint> implements RiskPointService {

    @Autowired
    private RiskPointService riskPointService;

    @Override
    public Page<RiskPoint> selectAllPages(Long page, Long limit) {
        Page<RiskPoint> riskPointPage = baseMapper.selectPage(new Page<>(page, limit), null);
        return riskPointPage;
    }

    @Override
    public List<RiskPoint> selectAllRiskPoint() {
        List<RiskPoint> riskPoints = baseMapper.selectList(null);
        return riskPoints;
    }

}
